import random
"""
年年会抽奖程序
张三科技有限公司有300员⼯工，开年年会抽奖，奖项如下：
⼀
一等奖 3名， 泰国5⽇日游
⼆
二等奖6名，Iphone⼿手机
三等奖30名，避孕套⼀一盒
规则：
1. 共抽3次，第⼀一次抽3等奖，第2次抽2等奖，第3次压轴抽1等奖
2. 每个员⼯工限中奖⼀一次，不不能重复
"""
# 员工工号规则:imp_xxx
employee_list = []  # 员工列表
for i in range(1, 301):
    if i < 10:
        employee_num = f'imp_00{str(i)}'  # 工号
    elif i < 100:
        employee_num = f'imp_0{str(i)}'
    else:
        employee_num = f'imp_{str(i)}'
    employee_list.append(employee_num)  # 将工号加入到员工列表里

print('三等奖30名，避孕套一盒')
# 现在抽取30名员工
third_prize_employee_list = []  # 获得三等奖的员工名单
for i in range(30):
    third_prize_employee = random.choice(employee_list) # 随机获取一名获得3等奖的员工
    third_prize_employee_list.append(third_prize_employee) # 添加到3等奖的获奖员工名单中
    employee_list.remove(third_prize_employee) # 从员工列表中删除获奖的员工
print('获得三等奖的员工是:')
for i in range(len(third_prize_employee_list)):
    if i == len(third_prize_employee_list) - 1:
        print(third_prize_employee_list[i])
    else:
        print(third_prize_employee_list[i], end='\t')

print('二等奖6名，Iphone手机')
# 现在抽取6名员工
second_prize_employee_list = []
for i in range(6):
    second_prize_employee = random.choice(employee_list)
    second_prize_employee_list.append(second_prize_employee)
    employee_list.remove(second_prize_employee)
print('获得二等奖的员工是:')
for i in range(len(second_prize_employee_list)):
    if i == len(second_prize_employee_list) - 1:
        print(second_prize_employee_list[i])
    else:
        print(second_prize_employee_list[i], end='\t')

print('一等奖 3名， 泰国5日游')
# 现在抽取6名员工
first_prize_employee_list = []
for i in range(3):
    first_prize_employee = random.choice(employee_list)
    first_prize_employee_list.append(first_prize_employee)
    employee_list.remove(first_prize_employee)
print('获得一等奖的员工是:')
for i in range(len(first_prize_employee_list)):
    if i == len(first_prize_employee_list) - 1:
        print(first_prize_employee_list[i])
    else:
        print(first_prize_employee_list[i], end='\t')


